/* 管理员后台统一样式 */

/* 基础变量 */
:root {
    --color-canvas-default: #ffffff;
    --color-canvas-subtle: #f6f8fa;
    --color-border-default: #d0d7de;
    --color-border-muted: #d8dee4;
    --color-fg-default: #1f2328;
    --color-fg-muted: #656d76;
    --color-fg-subtle: #6e7781;
    --color-accent-fg: #0969da;
    --color-accent-emphasis: #0969da;
    --color-success-fg: #1a7f37;
    --color-danger-fg: #d1242f;
    --color-warning-fg: #9a6700;
    --color-btn-bg: #f6f8fa;
    --color-btn-border: #d0d7de;
    --color-btn-hover-bg: #f3f4f6;
    --color-btn-hover-border: #c7c7c7;
    --color-btn-primary-bg: #1f883d;
    --color-btn-primary-hover-bg: #1a7f37;
    --color-input-bg: #ffffff;
    --color-input-border: #d0d7de;
    --color-shadow-small: 0 1px 0 rgba(31, 35, 40, 0.04);
    --color-shadow-medium: 0 3px 6px rgba(140, 149, 159, 0.15);
    --color-shadow-large: 0 8px 24px rgba(140, 149, 159, 0.2);
}

input,
textarea {
    border: 1px solid rgb(223, 219, 219, 0.4) !important;
}

/* 暗色主题 */
[data-theme="dark"] {
    --color-canvas-default: #0d1117;
    --color-canvas-subtle: #161b22;
    --color-border-default: #30363d;
    --color-border-muted: #21262d;
    --color-fg-default: #e6edf3;
    --color-fg-muted: #7d8590;
    --color-fg-subtle: #6e7681;
    --color-accent-fg: #2f81f7;
    --color-accent-emphasis: #2f81f7;
    --color-success-fg: #3fb950;
    --color-danger-fg: #f85149;
    --color-warning-fg: #d29922;
    --color-btn-bg: #21262d;
    --color-btn-border: #30363d;
    --color-btn-hover-bg: #30363d;
    --color-btn-hover-border: #8b949e;
    --color-btn-primary-bg: #238636;
    --color-btn-primary-hover-bg: #2ea043;
    --color-input-bg: #0d1117;
    --color-input-border: #30363d;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-fg-default);
    background-color: var(--color-canvas-default);
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-canvas-subtle);
    padding: 20px;
}

.login-box {
    background: var(--color-canvas-default);
    border: 1px solid var(--color-border-default);
    border-radius: 12px;
    box-shadow: var(--color-shadow-large);
    padding: 32px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    color: var(--color-fg-default);
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-fg-default);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--color-fg-muted);
    font-size: 14px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-fg-default);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0;
    border: 1px solid var(--color-input-border);
    border-radius: 6px;
    background-color: var(--color-input-bg);
    color: var(--color-fg-default);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent-emphasis);
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.12);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-fg-default);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.forgot-password {
    color: var(--color-accent-fg);
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 按钮样式 */
.login-btn {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--color-btn-primary-bg);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn:hover {
    background-color: var(--color-btn-primary-hover-bg);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 错误消息 */
.error-message {
    background-color: #ffeef0;
    border: 1px solid #ffc1cc;
    color: var(--color-danger-fg);
    padding: 12px;
    border-radius: 6px;
    margin-top: 16px;
    font-size: 14px;
}

[data-theme="dark"] .error-message {
    background-color: #2d1117;
    border-color: #8e1519;
}

/* 页脚 */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-default);
}

.login-footer p {
    color: var(--color-fg-muted);
    font-size: 12px;
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.footer-links a {
    color: var(--color-accent-fg);
    text-decoration: none;
    font-size: 12px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* 管理后台通用样式 */
.admin-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    background: var(--color-canvas-default);
    border-bottom: 1px solid var(--color-border-default);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--color-shadow-small);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--color-fg-default);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: var(--color-canvas-subtle);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--color-fg-default);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--color-canvas-subtle);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn {
    background: var(--color-btn-primary-bg);
    color: var(--color-btn-primary-text);
    border: none;
    padding: 10px 16px;
    margin: 8px 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn:hover {
    background: var(--color-btn-primary-hover-bg);
}

/* 侧边栏样式 */
.admin-sidebar {
    position: fixed;
    top: 60px;
    /* header高度 */
    left: 0;
    width: 250px;
    height: calc(100vh - 60px);
    background: var(--color-canvas-default);
    border-right: 1px solid var(--color-border-default);
    padding: 20px 0;
    overflow-y: auto;
    z-index: 999;
    transition: transform 0.3s ease;
}

.admin-sidebar.collapsed {
    transform: translateX(-100%);
}

.admin-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-sidebar-nav li {
    margin: 0;
}

.admin-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    color: var(--color-fg-default);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.admin-sidebar-nav a:hover {
    background: var(--color-canvas-subtle);
}

.admin-sidebar-nav a.active {
    background: var(--color-accent-subtle);
    color: var(--color-accent-fg);
    border-right: 3px solid var(--color-accent-emphasis);
}

/* 主内容区域 */
.admin-main {
    margin-left: 250px;
    margin-top: 60px;
    /* header高度 */
    padding: 24px;
    min-height: calc(100vh - 60px);
    transition: margin-left 0.3s ease;
}

.admin-sidebar.collapsed+.admin-main {
    margin-left: 0;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--color-fg-default);
    text-decoration: none;
}

.admin-nav-links {
    display: flex;
    gap: 16px;
}

.admin-nav-links a {
    color: var(--color-fg-default);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.admin-nav-links a:hover,
.admin-nav-links a.active {
    background-color: var(--color-btn-hover-bg);
}

.admin-user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-fg-default);
    margin-bottom: 8px;
}

.page-description {
    color: var(--color-fg-muted);
    font-size: 16px;
}

/* 卡片样式 */
.card {
    background: var(--color-canvas-default);
    border: 1px solid var(--color-border-default);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--color-shadow-small);
}

.card-header {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-default);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-fg-default);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--color-canvas-default);
    border: 1px solid var(--color-border-default);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--color-shadow-small);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--color-shadow-medium);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-accent-emphasis);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--color-fg-muted);
    font-size: 14px;
    font-weight: 500;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--color-border-default);
    border-radius: 8px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-canvas-default);
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-default);
}

.admin-table th {
    background: var(--color-canvas-subtle);
    font-weight: 600;
    color: var(--color-fg-default);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tr:hover {
    background: var(--color-canvas-subtle);
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 10px 16px;
    margin: 8px 0;
    border: 1px solid var(--color-btn-border);
    border-radius: 6px;
    background: var(--color-btn-bg);
    color: var(--color-fg-default);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--color-btn-hover-bg);
    border-color: var(--color-btn-hover-border);
}

.btn-primary {
    background: var(--color-btn-primary-bg);
    border-color: var(--color-btn-primary-bg);
    color: white;
}

.btn-primary:hover {
    background: var(--color-btn-primary-hover-bg);
    border-color: var(--color-btn-primary-hover-bg);
}

.btn-danger {
    background: var(--color-danger-fg);
    border-color: var(--color-danger-fg);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* 状态标签 */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #dcfce7;
    color: var(--color-success-fg);
}

.status-inactive {
    background: #fef3c7;
    color: var(--color-warning-fg);
}

.status-banned {
    background: #fecaca;
    color: var(--color-danger-fg);
}

[data-theme="dark"] .status-active {
    background: #14532d;
    color: var(--color-success-fg);
}

[data-theme="dark"] .status-inactive {
    background: #451a03;
    color: var(--color-warning-fg);
}

[data-theme="dark"] .status-banned {
    background: #7f1d1d;
    color: var(--color-danger-fg);
}

/* 活动列表样式 */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background-color: var(--color-canvas-subtle);
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--color-accent-emphasis);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: var(--color-fg-default);
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--color-fg-muted);
}

/* 系统状态样式 */
.system-status {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: var(--color-canvas-subtle);
    border-radius: 8px;
}

.status-label {
    font-weight: 500;
    color: var(--color-fg-default);
}

.status-value {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-good {
    background-color: #dcfce7;
    color: var(--color-success-fg);
}

.status-warning {
    background-color: #fef3c7;
    color: var(--color-warning-fg);
}

.status-error {
    background-color: #fecaca;
    color: var(--color-danger-fg);
}

[data-theme="dark"] .status-good {
    background-color: #14532d;
}

[data-theme="dark"] .status-warning {
    background-color: #451a03;
}

[data-theme="dark"] .status-error {
    background-color: #7f1d1d;
}

/* 用户管理页面样式 */
.search-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid var(--color-border-default);
    border-radius: 6px;
    background: var(--color-input-bg);
    color: var(--color-fg-default);
}

.search-box svg {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-fg-muted);
}

.filter-group {
    display: flex;
    gap: 0.5rem;
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid var(--color-border-default);
    border-radius: 6px;
    background: var(--color-input-bg);
    color: var(--color-fg-default);
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border-default);
}

.admin-table th {
    background: var(--color-canvas-subtle);
    font-weight: 600;
    color: var(--color-fg-default);
}

.admin-table tr:hover {
    background: var(--color-canvas-subtle);
}

/* 状态和角色标签 */
.status-badge,
.role-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background: #d1f7d1;
    color: #0f5132;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-banned {
    background: #f5c6cb;
    color: #721c24;
}

.role-admin {
    background: #cff4fc;
    color: #055160;
}

.role-vip {
    background: #fff3cd;
    color: #664d03;
}

.role-user {
    background: #e2e3e5;
    color: #41464b;
}

/* 深色主题下的状态标签 */
[data-theme="dark"] .status-active {
    background: #0f5132;
    color: #d1f7d1;
}

[data-theme="dark"] .status-inactive {
    background: #721c24;
    color: #f8d7da;
}

[data-theme="dark"] .status-banned {
    background: #721c24;
    color: #f5c6cb;
}

[data-theme="dark"] .role-admin {
    background: #055160;
    color: #cff4fc;
}

[data-theme="dark"] .role-vip {
    background: #664d03;
    color: #fff3cd;
}

[data-theme="dark"] .role-user {
    background: #41464b;
    color: #e2e3e5;
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 0.25rem;
}

.btn-sm {
    padding: 6px 10px;
    margin: 6px 0;
    font-size: 0.75rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border-default);
}

.page-info {
    color: var(--color-fg-muted);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--color-canvas-default);
    margin: 5% auto;
    border: 1px solid var(--color-border-default);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--color-shadow-large);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border-default);
}

.modal-header h3 {
    margin: 0;
    color: var(--color-fg-default);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-fg-muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--color-fg-default);
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--color-border-default);
}

/* 表单组 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-fg-default);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid var(--color-border-default);
    border-radius: 6px;
    background: var(--color-input-bg);
    color: var(--color-fg-default);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent-emphasis);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

/* 笔记管理页面样式 */
.note-title-link {
    color: var(--color-accent-fg);
    text-decoration: none;
    font-weight: 500;
}

.note-title-link:hover {
    text-decoration: underline;
}

.note-detail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.note-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: var(--color-canvas-subtle);
    border-radius: 6px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-item strong {
    color: var(--color-fg-muted);
    font-size: 0.875rem;
}

.note-content {
    flex: 1;
}

.note-content h4 {
    margin-bottom: 1rem;
    color: var(--color-fg-default);
}

#noteContentDisplay {
    padding: 1rem;
    background: var(--color-canvas-subtle);
    border-radius: 6px;
    border: 1px solid var(--color-border-default);
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-large {
    max-width: 800px;
    width: 90%;
}

.batch-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.batch-actions .btn {
    min-width: 120px;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

.message-success {
    background-color: var(--color-success-emphasis);
}

.message-warning {
    background-color: var(--color-attention-emphasis);
}

.message-error {
    background-color: var(--color-danger-emphasis);
}

.message-info {
    background-color: var(--color-accent-emphasis);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 暗色主题适配 */
[data-theme="dark"] .note-meta,
[data-theme="dark"] #noteContentDisplay {
    background: var(--color-canvas-inset);
}

/* 系统设置页面样式 */
.settings-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.settings-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 136, 255, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-accent-emphasis);
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--color-fg-default);
    user-select: none;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* 公告管理样式 */
.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.type-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.type-info {
    background-color: rgba(33, 136, 255, 0.1);
    color: var(--primary-color);
}

.type-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #f57c00;
}

.type-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.type-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-inactive {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* 备份管理样式 */
.backup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.backup-actions {
    display: flex;
    gap: 1rem;
}

.file-upload {
    position: relative;
    display: inline-block;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.file-upload-label:hover {
    background: var(--bg-hover);
}

/* 暗色主题适配 */
[data-theme="dark"] .type-info {
    background-color: rgba(33, 136, 255, 0.2);
}

[data-theme="dark"] .type-warning {
    background-color: rgba(255, 193, 7, 0.2);
}

[data-theme="dark"] .type-success {
    background-color: rgba(40, 167, 69, 0.2);
}

[data-theme="dark"] .type-error {
    background-color: rgba(220, 53, 69, 0.2);
}

[data-theme="dark"] .status-active {
    background-color: rgba(40, 167, 69, 0.2);
}

[data-theme="dark"] .status-inactive {
    background-color: rgba(108, 117, 125, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-header {
        padding: 12px 16px;
    }

    .admin-nav {
        gap: 16px;
    }

    .admin-nav-links {
        display: none;
    }

    .admin-container {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 24px;
    }

    .admin-container>div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }

    .filter-group {
        justify-content: stretch;
    }

    .filter-group select {
        flex: 1;
    }

    .btn-group {
        flex-wrap: wrap;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .modal-large {
        width: 95%;
    }

    .note-meta {
        grid-template-columns: 1fr;
    }

    .batch-actions {
        flex-direction: column;
        align-items: center;
    }

    .message {
        right: 10px;
        left: 10px;
        text-align: center;
    }

    .settings-tabs {
        flex-wrap: wrap;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .announcement-header,
    .backup-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .backup-actions {
        flex-direction: column;
    }
}